/*
 * @Description:
 * @Version: 2.0
 * @Autor: Seven
 * @Date: 2023-10-19 17:45:02
 * @LastEditors: Seven
 * @LastEditTime: 2023-10-31 09:09:08
 */
import React, { memo } from "react";
import { Modal } from "antd";
const DetailModal = memo(
  ({ isModalDetailOpen, handleDetailCancel, yearInfo }) => {
    return (
      <div>
        <Modal
          title="详情"
          open={isModalDetailOpen}
          onOk={handleDetailCancel}
          onCancel={handleDetailCancel}
        >
          <div>
            <div>专业：{yearInfo?.speciality} </div>
            <div>设备分类：{yearInfo?.device} </div>
            <div>描述：{yearInfo?.description} </div>
            <div>线路：{yearInfo?.line} </div>
            <div>状态：{yearInfo?.status} </div>
            {yearInfo.url && (
              <div>
                {yearInfo?.filename || "图片"}：
                <a href={yearInfo?.url}>查看图片</a>
              </div>
            )}
          </div>
        </Modal>
      </div>
    );
  }
);

export default DetailModal;
